package com.jinzhi.common.utils;

//import com.itextpdf.text.DocumentException;
//import com.itextpdf.text.Image;
//import com.itextpdf.text.pdf.*;
//
//import java.io.File;
//import java.io.FileInputStream;
//import java.io.FileOutputStream;
//import java.io.IOException;
//import java.util.List;
//import java.util.Map;
public class profileAppendStamp {
    private static void f() {
//        String filePath = "D:/profile/profile";
//        File[] files = new File(filePath).listFiles();
//        Image img = Image.getInstance("D:/profile/stamp.png");
//        img.scaleToFit(150,150);
//        img.setAbsolutePosition(177,122);
//        int i=1;
//        for(File f: files){
//            PdfReader reader = new PdfReader(f.getPath());
//            reader.selectPages("1");
//            PdfStamper stamper = new PdfStamper(reader,new FileOutputStream("D:/profile/complete/"+f.getName()));
//
//            PdfContentByte under = stamper.getOverContent(1);
//            under.addImage(img);
//            stamper.close();
//            reader.close();
//
//            System.out.println("完成度:"+i+"/"+files.length);
//            i++;
//        }
        System.out.println("已全部完成");
    }
    public static void main(String[] args) {
        f();
    }
}
